//
//  BKXianShangSearchView.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/24.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "BKXianShangSearchView.h"

@implementation BKXianShangSearchView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self initSubView];
        [self layout];
    }
    return self;
}
- (void)initSubView{
    [self addSubview:self.searchView];
    [_searchView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.centerY.equalTo(self.mas_centerY);
        make.width.equalTo(@400);
        make.height.equalTo(@30);
    }];
}
- (void)layout{
    
}
- (LWQSearchView *)searchView{
    if (!_searchView) {
        LWQSearchView *view = [[LWQSearchView alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.width, 30) initWithType:0 andImageName:@"search_buke"];
        _searchView = view;
    }
    return _searchView;
}
@end
